function isIsogram(str){
    let flag = true;
    str.split('').reduce((pre,cur)=>{
        if(pre[cur.toLowerCase()]){
            pre[cur]++;
            flag = false;
        }else{
            pre[cur] = 1
        }
        return pre;
    },{})
    return flag
}
console.log(isIsogram('abA'));

function isIsogram1(str){
    return new Set(str.toUpperCase()).size == str.length
}
console.log(isIsogram1('abA'));
